/**
 * Project Name:ResultMsg.java
 * File Name:ResultMsg.java
 * Date:2019/3/10 17:55
 * Copyright (c) 2019, zhang.xiangyu@foxmail.com All Rights Reserved.
 */
package com.meatball.utils.response;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldNameConstants;

/**
 * @Title: ResultMsg.java
 * @Description: todo(定义返回消息格式)
 * @Author: 張翔宇
 * @Date: 2019/3/10 17:55
 * @Version: V1.0
 */
@Data
@AllArgsConstructor
public class ResultMsg<T> {
    /**
     * 状态码
     */
    private int code;

    /**
     * 消息内容
     */
    private String message;

    /**
     * 数据信息
     */
    private T data;

    /**
     * @title: ResultMsg
     * @description: todo(不带数据返回)
     * @params: [code, message]
     * @return:     返回类型
     * @author: 張翔宇
     * @date: 2019/3/10 17:56
     */
    public ResultMsg(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
